package com.base.logistics.sf.bean.order;

import com.base.logistics.sf.bean.Result;
import com.base.logistics.utils.SfGsonBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * <pre>
 * 创建订单响应对象
 * </pre>
 * @since 2021-02-17
 */
public class CreateOrderResponse implements Serializable {

    /**
     * 客户订单号
     */
    private String orderId;

    /**
     * 原寄地区域代码，可用于顺丰电子运单标签打印
     */
    private String originCode;

    /**
     * 目的地区域代码，可用于顺丰电子运单标签打印
     */
    private String destCode;

    /**
     * 筛单结果：1：人工确认;2：可收派;3：不可以收派
     */
    private Integer filterResult;

    /**
     * 如果filter_result=3时为必填，不可以收派的原因代码：1：收方超范围;2：派方超范围;3：其它原因
     */
    private String remark;

    /**
     * 二维码URL（用于CX退货操作的URL）
     */
    private String url;

    /**
     * 用于第三方支付运费的URL
     */
    private String paymentLink;

    /**
     * 是否送货上楼 1:是
     */
    private String isUpstairs;

    /**
     * 包含特殊仓库增值服务
     */
    private String isSpecialWarehouseService;

    /**
     * 下单补充的增值服务信息
     */
    private List<Service> serviceList;

    /**
     * 顺丰运单号
     */
    private List<WaybillNoInfo> waybillNoInfoList;

    /**
     * 路由标签
     */
    private List<RouteLabelInfo> routeLabelInfo;

    /**
     * 返回信息扩展属性
     */
    private List<ExtraInfo> returnExtraInfoList;

    public CreateOrderResponse() {
    }

    public static CreateOrderResponse fromJson(String json) {
        Result data = SfGsonBuilder.create().fromJson(json, Result.class);
        json = SfGsonBuilder.create().toJson(data.getMsgData());
        return SfGsonBuilder.create().fromJson(json, CreateOrderResponse.class);
    }

    public String getOrderId() {
        return this.orderId;
    }

    public String getOriginCode() {
        return this.originCode;
    }

    public String getDestCode() {
        return this.destCode;
    }

    public Integer getFilterResult() {
        return this.filterResult;
    }

    public String getRemark() {
        return this.remark;
    }

    public String getUrl() {
        return this.url;
    }

    public String getPaymentLink() {
        return this.paymentLink;
    }

    public String getIsUpstairs() {
        return this.isUpstairs;
    }

    public String getIsSpecialWarehouseService() {
        return this.isSpecialWarehouseService;
    }

    public List<Service> getServiceList() {
        return this.serviceList;
    }

    public List<WaybillNoInfo> getWaybillNoInfoList() {
        return this.waybillNoInfoList;
    }

    public List<RouteLabelInfo> getRouteLabelInfo() {
        return this.routeLabelInfo;
    }

    public List<ExtraInfo> getReturnExtraInfoList() {
        return this.returnExtraInfoList;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public void setOriginCode(String originCode) {
        this.originCode = originCode;
    }

    public void setDestCode(String destCode) {
        this.destCode = destCode;
    }

    public void setFilterResult(Integer filterResult) {
        this.filterResult = filterResult;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setPaymentLink(String paymentLink) {
        this.paymentLink = paymentLink;
    }

    public void setIsUpstairs(String isUpstairs) {
        this.isUpstairs = isUpstairs;
    }

    public void setIsSpecialWarehouseService(String isSpecialWarehouseService) {
        this.isSpecialWarehouseService = isSpecialWarehouseService;
    }

    public void setServiceList(List<Service> serviceList) {
        this.serviceList = serviceList;
    }

    public void setWaybillNoInfoList(List<WaybillNoInfo> waybillNoInfoList) {
        this.waybillNoInfoList = waybillNoInfoList;
    }

    public void setRouteLabelInfo(List<RouteLabelInfo> routeLabelInfo) {
        this.routeLabelInfo = routeLabelInfo;
    }

    public void setReturnExtraInfoList(List<ExtraInfo> returnExtraInfoList) {
        this.returnExtraInfoList = returnExtraInfoList;
    }

}
